#include "CarDecoratorSwim.h"
#include <QDebug>

#include "UI/ModRun/Output/FactoryOutput.h"

CarDecoratorSwim::CarDecoratorSwim(std::shared_ptr<InterFaceCar> pCar) : CarDecorator(pCar)
{
    
}

CarDecoratorSwim::~CarDecoratorSwim()
{

}


//移动;
void CarDecoratorSwim::Move()
{
    CarDecorator::Move();
    Swim();
}

//水上漂;
void CarDecoratorSwim::Swim()
{
    QString strOutput = "Car::Swim:水上漂";
    qDebug() << strOutput;
    std::shared_ptr<IOutput> pOutPut = FactoryOutput::GetInstance()->CreateRunOutput();
    if (pOutPut)
    {
        std::initializer_list<QString> outList{ strOutput };
        pOutPut->OutPut(outList);
    }
}

